﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;

namespace Hetang.Models.Helper
{
    public class JsonHelper
    {
        public static T parse<T>(string jsonString)
        {
            return new JavaScriptSerializer().Deserialize<T>(jsonString);
        }

        public static string stringify(object jsonObject)
        {
            return new JavaScriptSerializer().Serialize(jsonObject);
        }
    }
}